<template>
<div class="newsList-box">
  <div class="newsList">
        <ul>
          <li v-for="(news, index) in newsList" :key="index" @click="toNewDetail(news)" >
            <a href="javascript:void(0)"> 
              <p class="title">{{news.title}}</p>
              <!-- <img :src="news.image" alt=""> -->
              <p class="date">{{news.time}}</p>
            </a>
          </li>
        </ul>
      </div>
  </div>    
</template>

<script>
import news from '../../../static/news/syxynews.json'
  export default{
    data(){
      return {
        newsList:[]
      }
    },
    mounted() {
      this.newsList= news
    },
    methods: {
      toNewDetail(news){
        wx.navigateTo({
          url:'/pages/newDetail/main?news='+ JSON.stringify(news)
        })
      } 
    },
  }
</script>

<style scoped>
.newsList-box .newsList{
  width: 85%;
  margin:auto ;
  
}

.newsList-box .newsList ul li{
  margin-top: 23px;
  background: rgb(161, 154, 154);
  box-shadow: -10px 10px rgb(148, 143, 143);
  opacity: .7;
  border-radius: 10px;
}

.newsList-box .newsList ul li .title{
  font-size: 40rpx;

}

.newsList-box .newsList ul li .date{
  font-size: 30rpx;
  padding-left: 178px;
  
}


</style>
